package com.gsafety.wellsfort.common.constant;

import com.gsafety.wellsfort.common.util.EnvironmentUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * oss文件操作常量
 */
@Slf4j
public class OSSConstant {
    public static String URL = "https://imm.cn-beijing.aliyuncs.com";
    public static String PROJECT_NAME = "ynxprew";
    public static String END_POINT = "oss-cn-hangzhou.aliyuncs.com";
    //内网
    public static String END_INTERNAL_POINT = "oss-cn-hangzhou-internal.aliyuncs.com";
    public static String REGION_ID = "cn-hangzhou";
    public static String ACCESS_KEY_ID = "LTAI4Fya6pA4af4dgzeaD9aU";
    public static String ACCESS_KEY_SECRET = "YHCzYreOxOkOJY9RwCLrZFGXYCxcOW";
    // 空间
    public static String BUCKET_NAME = "huadongyinengxing";

    static {
        if (EnvironmentUtil.isDev()) {
            log.info("读取oss环境配置");
            URL = "https://imm.cn-beijing.aliyuncs.com";
            PROJECT_NAME = "ynxprew";
            END_POINT = "oss-cn-beijing.aliyuncs.com";
            END_INTERNAL_POINT = "oss-cn-beijing-internal.aliyuncs.com";
            REGION_ID = "cn-beijing";
            ACCESS_KEY_ID = "LTAI4Fya6pA4af4dgzeaD9aU";
            ACCESS_KEY_SECRET = "YHCzYreOxOkOJY9RwCLrZFGXYCxcOW";
            BUCKET_NAME = "yinengxing";
        }
    }
}
